<div id="venue_count<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>">
    <div class="batch-second">
        <div class="details-collapse clearfix" >
            <h3><span>batch <span class="createdVenueBatchCount create_venue_<?php echo $venueIndex; ?>_batchcounter" id="create_venue_<?php echo $venueIndex; ?>_batch_counter_<?php echo $batchIndex; ?>"><?php echo $batchIndex + 1; ?></span></span> <span class="buttom-exp pull-right"><em class="sprite dw-arrow"></em></span> </h3>
        </div>
        <div class="uncollapse clearfix" style="display: none;">
            <div class="col-lg-3 col-md-3 col-sm-3 column3 course-pdl">
                <label for="CourseBatche_date_from" class="required">Start Date 
                    <span class="required">*</span></label>
                <input type="hidden" name="batchIndex[<?php echo $venueIndex; ?>][]" value="<?php echo $batchIndex; ?>">
                <input id="course_venue_<?php echo $venueIndex; ?>_batch_start_date_<?php echo $batchIndex; ?>" name="CourseBatche[ClassVenue][<?php echo $venueIndex; ?>][date_from][]" type="text" class="requiredfield hasDatepicker span2 form-control book-control" onkeyup="hasDatepicker(this.id);" onchange="checkDate(this.id)" onblur="checkValueEmpty(this.id)" onclick="hasDatepicker(this.id);" onpaste="return false;" value="<?php echo $venueWithBatch[$batchIndex]->date_from; ?>">
                <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_start_date_<?php echo $batchIndex; ?>" style="display:none">Start date cannot be blank.</div></div>

            <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3">
                <label for="CourseBatche_date_to" class="required">End Date <span class="required">*</span></label>
                <input name="CourseBatche[ClassVenue][<?php echo $venueIndex; ?>][date_to][]" id="course_venue_<?php echo $venueIndex; ?>_batch_end_date_<?php echo $batchIndex; ?>" type="text" class="hasDatepicker requiredfield span2 form-control book-control" onkeyup="hasDatepicker(this.id)" onchange="checkDate(this.id)" onclick="hasDatepicker(this.id)" onpaste="return false;" onblur="checkValueEmpty(this.id)" value="<?php echo $venueWithBatch[$batchIndex]->date_to; ?>">
                <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_end_date_<?php echo $batchIndex; ?>" style="display:none">End date cannot be blank.</div>
                <div class="errorMessage" id="enddate_course_venue_<?php echo $venueIndex; ?>_batch_end_date_<?php echo $batchIndex; ?>"></div>                                
            </div>
            <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3">
                <label for="CourseBatche_price" class="required">Price <span class="required">*</span></label>
                <input name="CourseBatche[ClassVenue][<?php echo $venueIndex; ?>][price][]" id="course_venue_<?php echo $venueIndex; ?>_batch_price_<?php echo $batchIndex; ?>" type="text" onkeypress="return isNumberKey(event)" class="requiredfield span2 form-control book-control" onblur="checkValueEmpty(this.id)" value="<?php echo $venueWithBatch[$batchIndex]->price; ?>">
                <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_price_<?php echo $batchIndex; ?>" style="display:none">Price cannot be blank.</div>
            </div>
            <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3">
                <label for="CourseBatche_seats" class="required">Seats <span class="required">*</span></label>
                <input name="CourseBatche[ClassVenue][<?php echo $venueIndex; ?>][seats][]" id="course_venue_<?php echo $venueIndex; ?>_batch_seats_<?php echo $batchIndex; ?>" type="text" onkeypress="return isNumberKey(event)" class="requiredfield span2 form-control book-control" onblur="checkValueEmpty(this.id)" value="<?php echo $venueWithBatch[$batchIndex]->seats; ?>">
                <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_seats_<?php echo $batchIndex; ?>" style="display:none">Seats cannot be blank.</div>
            </div>
            <div class="batch-disc">
                <h4>Batch discounts:</h4>
                <?php /* .......................          Here is the early discount code start................ */ ?>
                <?php /* .......................          Here is the early discount code start................ */ ?>
                <?php
                $this->renderPartial('/courseBatche/_courseEarlyDiscount', array('form' => $form, 'batchIndex' => $batchIndex,
                    'venueIndex' => $venueIndex,
                    'batchId' => $venueWithBatch[$batchIndex]->id));
                ?> 


                <?php /* .......................          Here is the early discount code end................ */ ?>

                <?php /* .......................          Here is the group discount code start................ */ ?>
                <?php
                $this->renderPartial('/courseBatche/_courseGroupDiscount', array('form' => $form, 'batchIndex' => $batchIndex,
                    'venueIndex' => $venueIndex,
                    'batchId' => $venueWithBatch[$batchIndex]->id));
                ?> 


                <?php /* .......................          Here is the group discount code end ................ */ ?>
                <?php $daySesion = CourseBatcheDaySession::model()->findAllByAttributes(array('course_batche_id' => $venueWithBatch[$batchIndex]->id)); ?>
                <?php
                $dateSesion = '';
                $dateSesion = CourseBatcheDateSession::model()->findAllByAttributes(array('course_batche_id' => $venueWithBatch[$batchIndex]->id));
                $totaldateSesion = 0;
                $totaldateSesion = count($dateSesion);
                ?>

                <div class="row">
                    <div class="col-lg-12 col-md-12 col-sm-12 course-pdl column12">
                        <div class="my-radio">
                            <input <?php if (!empty($daySesion)) { ?> checked="checked" <?php } ?>  type="radio" class="fancyRadio"  id="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_show_hide" name="days_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateSession" onclick="showDateSessionAndDaySesion(this.id)"><label for="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_show_hide">Days of the week</label>
                            <input <?php if (!empty($dateSesion)) { ?> checked="checked" <?php } ?> type='radio' class="fancyRadio"  id="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateSession" name="days_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateSession" onclick="showDateSessionAndDaySesion(this.id)"><label for="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateSession" name="date_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateSession">Number of Sessions</label>

                        </div>
                    </div>
                </div> 

            </div>
            <div class="batch-disc">
                <h4>Batch Session:</h4>
                <?php
                $totalSesion = 0;
                if (!empty($daySesion)) {
                    $this->renderPartial('/courseBatche/courseBatcheDaysession', array('form' => $form, 'batchIndex' => $batchIndex,
                        'venueIndex' => $venueIndex,
                        'batchId' => $venueWithBatch[$batchIndex]->id,
                        'daySesion' => $daySesion));
                    $totalSesion = count($daySesion);
                }
                ?>
                <div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_show_hide"  <?php
                if (!empty($daySesion) || !empty($dateSesion)) {
                    echo 'style="display:none"';
                }
                ?> ></div>
                <div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession"></div>
                <div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_addSesion" <?php
                if (!empty($dateSesion)) {
                    echo'style="display:none;"';
                }
                ?>>
                    <div class="form-group">
                        <div class="col-lg-3 col-md-3 col-sm-3 add-disc course-pdl column3">
                            <a  href="javascript:void(0);" onclick="addDaySession(this.id);" id="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_<?php echo $totalSesion; ?>">+Add More</a>
                        </div>
                    </div>
                </div>
                <div class="form-group venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateNoSession" <?php
                if (!empty($daySesion) && empty($dateSesion)) {
                    echo 'style="display:none"';
                }
                ?>>
                    <div class="row">
                        <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3">
                            <label for="add-session">Add session:</label>
                            <input type="text" class="form-control book-control" name="CourseBatche[ClassVenue][<?php echo $venueIndex; ?>][no_of_session][]" id="no_of_session_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>" onchange="dateSessionValue(this.id);" onkeyup=" dateSessionValue(this.id);" onkeypress="return isNumberKey(event);" placeholder="0" value="<?php echo $totaldateSesion; ?>" maxlength="2">
                            <div class="errorMessage" id="error_course_no_of_session_venue_0_batch_0" style="display:none">No of session cannot be blank.</div>
                        </div>
                        <div class="col-lg-9 col-md-9 col-sm-9 column9"></div>
                    </div>
                </div>
                <div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateSession" > 
                    <?php
                    if (!empty($dateSesion)) {
                        $this->renderPartial('/courseBatche/courseBatchedateSession', array('form' => $form, 'batchIndex' => $batchIndex,
                            'venueIndex' => $venueIndex,
                            'batchId' => $venueWithBatch[$batchIndex]->id,
                            'dateSesion' => $dateSesion));
                    }
                    ?> </div>
            </div>
            <?php /* .......................         Here is the class structure code start................ */ ?>
            <div class="class-struct">
                <h4>class structure:</h4> 
                <?php
                $class = 'course';
                $this->renderPartial('/classStructures/updateClassStructure', array('form' => $form, 'batchIndex' => $batchIndex,
                    'venueIndex' => $venueIndex,
                    'type' => $class,
                    'classId' => $venueWithBatch[$batchIndex]->courses_id,
                    'batchId' => $venueWithBatch[$batchIndex]->id));
                ?> 
            </div>
            <?php /* .......................         Here is the class structure code end................ */ ?>
            <?php if ($batchIndex != 0) { ?>
                <div class="row batch-row adding-el"> <div class="col-lg-12 column12 course-pdr">
                        <a href="javascript:void(0)" id="venue_remove_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>" onclick="reMoveBatch(this.id);">-Remove Batch</a>

                    </div></div>

            <?php } ?>
        </div>
    </div>
</div>